﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Hired1Div.master" AutoEventWireup="true" CodeBehind="create.aspx.cs" Inherits="Hired.employer.create" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadPlaceHolder" runat="server">
    <style type="text/css">
        .style1
        {
            width: 50%;
        }
        .style2
        {
            width: 138px;
            text-align: right;
            padding-right: 5px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainPlaceHolder" runat="server">
    <span class="identifier"><a href="../settings.aspx">Account Settings</a> &gt;&gt; Create an Employer Passport</span>
    <p>
        An employer passport can be used to access the company account with different <abbr title="username and password">credentials</abbr>.<br />
        You can specify whether the employer is an <em>administrator</em>. An <em>administrator</em> employer passport can create, view, update, and delete other employer passports.<br />
    </p>
    <table class="style1">
        <tr>
            <td class="style2">
                First Name:</td>
            <td>
        <asp:TextBox ID="txtFirstName" runat="server" MaxLength="50"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldFirstName" runat="server" 
                    ErrorMessage="Required Field" ForeColor="Red" Display="Dynamic" 
                    Font-Size="X-Small" ControlToValidate="txtFirstName" 
                    ValidationGroup="CreateGroup"></asp:RequiredFieldValidator>
           
            </td>
        </tr>
        <tr>
            <td class="style2">
                Last Name:</td>
            <td>
        <asp:TextBox ID="txtLastName" runat="server" MaxLength="50"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldLastName" runat="server" 
                    ErrorMessage="Required Field" ForeColor="Red" Display="Dynamic" 
                    Font-Size="X-Small" ControlToValidate="txtLastName" 
                    ValidationGroup="CreateGroup"></asp:RequiredFieldValidator>
           
            </td>
        </tr>
        <tr>
            <td class="style2">
                Username:</td>
            <td>
        <asp:TextBox ID="txtUsername" runat="server" MaxLength="50"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldUsername" runat="server" 
                    ErrorMessage="Required Field" ForeColor="Red" Display="Dynamic" 
                    Font-Size="X-Small" ControlToValidate="txtUsername" 
                    ValidationGroup="CreateGroup"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionUsername" runat="server" 
                    ControlToValidate="txtUsername" Display="Dynamic"
                    ErrorMessage="Username should contain only alphabets, numbers, and underscores" Font-Size="X-Small" 
                    ForeColor="Red" ValidationExpression="^[a-zA-Z0-9_]*$"
                    ValidationGroup="CreateGroup"></asp:RegularExpressionValidator>
           
                <asp:CustomValidator ID="CustomUsername" runat="server" 
                    ControlToValidate="txtUsername" Display="Dynamic" ErrorMessage="Username already in use" 
                    Font-Size="X-Small" ForeColor="Red" ValidationGroup="CreateGroup" 
                    onservervalidate="CustomUsername_ServerValidate"></asp:CustomValidator>
           
            </td>
        </tr>
        <tr>
            <td class="style2">
                Password:</td>
            <td>
        <asp:TextBox ID="txtPassword" runat="server" TextMode="Password" MaxLength="18"></asp:TextBox>
             <asp:RequiredFieldValidator ID="RequiredFieldPassword" runat="server" 
                    Display="Dynamic" ErrorMessage="Required Field" Font-Size="X-Small" 
                    ForeColor="Red" ControlToValidate="txtPassword"
                    ValidationGroup="CreateGroup"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionPassword" runat="server" 
                    ControlToValidate="txtPassword" Display="Dynamic" 
                    
                    
                    
                    ErrorMessage="Password should contain only alphabets and numbers, and have a length of 6-18" Font-Size="X-Small" 
                    ForeColor="Red" ValidationExpression="^[a-zA-Z0-9]{6,18}$"
                    ValidationGroup="CreateGroup"></asp:RegularExpressionValidator>
           
            </td>
        </tr>
        <tr>
            <td class="style2">
                Re-enter password:</td>
            <td>
        <asp:TextBox ID="txtReenterPassword" runat="server" TextMode="Password" MaxLength="18"></asp:TextBox>
             <asp:RequiredFieldValidator ID="RequiredFieldReenterPassword" runat="server" 
                    Display="Dynamic" ErrorMessage="Required Field" Font-Size="X-Small" 
                    ForeColor="Red" ControlToValidate="txtReenterPassword"
                    ValidationGroup="CreateGroup"></asp:RequiredFieldValidator>
                <asp:CompareValidator ID="CompareValidatorPassword" runat="server" 
                    ControlToCompare="txtPassword" ControlToValidate="txtReenterPassword" 
                    ErrorMessage="Passwords do not match" Font-Size="X-Small" ForeColor="Red"
                    ValidationGroup="CreateGroup"></asp:CompareValidator>
            </td>
        </tr>
       <tr>
            <td class="style2">
                E-mail address:</td>
            <td>
        <asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldEmail" runat="server" 
                    Display="Dynamic" ErrorMessage="Required Field" Font-Size="X-Small" 
                    ForeColor="Red" ControlToValidate="txtEmail"
                    ValidationGroup="CreateGroup"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionEmail"
                    runat="server" Display="Dynamic" ErrorMessage="E-mail address is invalid"
                    Font-Size="X-Small" ForeColor="Red" ControlToValidate="txtEmail"
                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ValidationGroup="CreateGroup">
                    </asp:RegularExpressionValidator>
                <asp:CustomValidator ID="CustomEmail" runat="server" 
                    ControlToValidate="txtEmail" Display="Dynamic" ErrorMessage="E-mail address already in use" 
                    Font-Size="X-Small" ForeColor="Red" ValidationGroup="CreateGroup" 
                    onservervalidate="CustomEmail_ServerValidate"></asp:CustomValidator>
            </td>
        </tr>
        <tr>
            <td class="style2">
                Security Question:</td>
            <td>
                <asp:DropDownList ID="ddlSecurityQuestion" runat="server">
                    <asp:ListItem>Please select a security question</asp:ListItem>
                    <asp:ListItem>What is the name of your first teacher?</asp:ListItem>
                    <asp:ListItem>What is the name of your first pet?</asp:ListItem>
                    <asp:ListItem>What is the name of the first company you worked for?</asp:ListItem>
                    <asp:ListItem>What is the model of the first car you owned?</asp:ListItem>
                    <asp:ListItem>What was your favourite book as a child?</asp:ListItem>
                    <asp:ListItem>What was your favourite dessert as a child?</asp:ListItem>
                    <asp:ListItem>What was your favourite movie as a teenager?</asp:ListItem>
                    <asp:ListItem>Where did you take your first vacation?</asp:ListItem>
                    <asp:ListItem>Who was your favourite musical artist as a teenager?</asp:ListItem>
                </asp:DropDownList>
                <asp:RequiredFieldValidator ID="RequiredFieldSecurityQuestion" runat="server" 
                    Display="Dynamic" ErrorMessage="Required Field" Font-Size="X-Small" 
                    ForeColor="Red" ControlToValidate="ddlSecurityQuestion"
                    ValidationGroup="CreateGroup" 
                    InitialValue="Please select a security question"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style2">
                Security Answer:</td>
            <td>
        <asp:TextBox ID="txtSecurityAnswer" runat="server" MaxLength="18" 
                    Width="270px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldSecurityAnswer" runat="server" 
                    Display="Dynamic" ErrorMessage="Required Field" Font-Size="X-Small" 
                    ForeColor="Red" ControlToValidate="txtSecurityAnswer"
                    ValidationGroup="CreateGroup"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style2">
                Administrator?</td>
            <td>
                <asp:CheckBox ID="cbAdministrator" runat="server" />
            </td>
        </tr>
        <tr>
            <td class="style2">
                &nbsp;</td>
            <td>
                <asp:Button ID="btnCancel" runat="server" Text="Cancel" style="float: right;" 
                    onclick="btnCancel_Click" />
                <asp:Button ID="btnSubmit" runat="server" Text="Submit" 
                    style="float: right; margin-right: 10px;" ValidationGroup="CreateGroup" 
                    onclick="btnSubmit_Click"/></td>
        </tr>
    </table>


</asp:Content>
